import request from "./request";

import qs from 'qs'

// 配置具体的请求接口
//精品推荐
export const GetJingPingDataApi = () => request.get('/products/recommend')

//热门兑换
export const GetHotDataApi = () => request.get('/products/hot')

//发送短信验证码
export const getCodeApi = (params) => request.post('/sendSMS', qs.stringify(params))

// 手机号验证码登录  /phoneRegin
export const LoginApi = (params) => request.post('/phoneRegin', qs.stringify(params))

// 获取用户信息 /shop/userProfiles
export const getUserInfoApi = () => request.get('/shop/userProfiles')


// 微信登录（这个接口必须用qs对数据进行格式化）
export const WeixinLoginApi = (params) => request.post(`/wechatUsers/PCLogin`, qs.stringify(params));


// 手机绑定微信 /wechatUsers/binding
export const bindWechatPhoneApi = (params) => request.post('/wechatUsers/binding', qs.stringify(params))


// 手机解绑微信 /wechatUsers/unbindingWeChat
export const UnbindWechatPhoneApi = () => request.put('/wechatUsers/unbindingWeChat')
